package cn.alcatraz.controller;

import cn.alcatraz.domain.AjaxResult;
import cn.alcatraz.domain.Store;
import cn.alcatraz.service.IStoreSerive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/store")
public class StoreController {

    @Autowired private IStoreSerive storeSerive;

    @PostMapping
    public AjaxResult save(@RequestBody Store store){
        storeSerive.save(store);
        return AjaxResult.myself().setSuccess(true).setMessage("操作成功");
    }
}
